package com.resou.reader.reader.adpter;

import android.support.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.resou.reader.R;
import com.resou.reader.api.entry.SubSidyBean;
import com.resou.reader.api.entry.SubSidyDetailBean;
import com.resou.reader.utils.DateUtils;

import java.util.List;

public class SubSidyAdapter extends BaseQuickAdapter<SubSidyDetailBean.LatestSubsidyBean, BaseViewHolder> {
    public SubSidyAdapter(int layoutResId, @Nullable List<SubSidyDetailBean.LatestSubsidyBean> data) {
        super(layoutResId, data);
    }

    public SubSidyAdapter(@Nullable List<SubSidyDetailBean.LatestSubsidyBean> data) {
        super(data);
    }

    @Override
    protected void convert(BaseViewHolder helper, SubSidyDetailBean.LatestSubsidyBean item) {
        helper.setText(R.id.tvBookName, item.getNovelName() + "")
                .setText(R.id.tvTime, DateUtils.transferLongToDate("yyyy-MM.dd  HH:mm:ss", item.getCreateTime()))
                .setText(R.id.tvSubSidyPrice, item.getNovelSubsidyPrice() + "");
    }
}
